# coding=utf-8
from . import api
from iHome import redis_store
import logging
from flask import current_app


@api.route('/index')
def index():
    logging.debug("This is a debug log.")
    logging.info("This is a info log.")
    logging.warning("This is a warning log.")
    logging.error("This is a error log.")
    logging.critical("This is a critical log.")
    redis_store.set('name', 'laang')

    current_app.logger.debug("This is a debug log.")
    current_app.logger.info("This is a info log.")
    current_app.logger.warning("This is a warning log.")
    current_app.logger.error("This is a error log.")
    current_app.logger.critical("This is a critical log.")
    return 'index'
